package tp3.pages.java;

import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;

import tp1_Model.Mapa;

public class HomePage extends GeneralPage {
	private static final long serialVersionUID = 1L;
	private Mapa mapa;

	public HomePage(final PageParameters parameters) {
		// TODO Add your page's components here

		// WebMarkupContainer css = new WebMarkupContainer("mycss");
		// add(css);

		add(new Link<Object>("crearpersonaje") {
			@Override
			public void onClick() {
				this.setResponsePage(CrearPersonajePage.class);
			}
		});

		add(new Link<Object>("verpersonajes") {
			@Override
			public void onClick() {
				this.setResponsePage(VerPersonajesPage.class);
			}
		});

		add(new Link<Object>("vertablero") {
			@Override
			public void onClick() {
				System.out.println("prueba");
				this.setResponsePage(DetalleTablero.class);
			}
		});

		add(new Link<Object>("crearEsfera") {
			@Override
			public void onClick() {
				this.setResponsePage(CrearEsferaPage.class);
			}
		});

		// add(new Include("footer", "Footer.html"));
	}

	protected CompoundPropertyModel createModel() {
		this.mapa = Mapa.getInstance();
		return new CompoundPropertyModel(this.mapa);
	}
}
